﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace AnimationTool
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Form1());
            Form1 mainForm = new Form1();
            mainForm.Show();

            mainForm.Initialize();

            int timeNow = System.Environment.TickCount;

            while(mainForm.Looping)
            {
                int timeBefore = timeNow;
                timeNow = System.Environment.TickCount;
                float changeTime = (timeNow - timeBefore) / 1000.0f;

                mainForm.Update(changeTime);
                mainForm.Render();

                Application.DoEvents();
            }
        }
    }
}
